// 取出来调用后端接口的地址
import { API_CONFIG } from "../config/index.js";
import request from "../api/index.js";
// 在很多位置，都可能用到同一个接口, data: {}
export const getPVListHandler = (data) => {
    return request(API_CONFIG.getPVListApi, data, "get", "2000")
}

export const deletePVHandler = (clusterId, namespace, name) => {
    return request(API_CONFIG.deletePVApi, {clusterId, namespace, name}, "post", "2000")
}
// 
export const createPVHandler = (data) => {
    return request(API_CONFIG.createPVApi, data, "post", "2000")
}

export const updatePVHandler = (data) => {
    return request(API_CONFIG.updatePVApi, data, "post", "2000")
}

export const getPVDetailHandler = (data) => {
    return request(API_CONFIG.getPVApi, data, "get", "2000")
}

export const getStorageClassListHandler = (data) => {
    return request(API_CONFIG.getStorageClassListApi, data, "get", "2000")
}